#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    button = new QPushButton(this);
    button->setText("fuck you all!");
    button->move(300,0);
    button->setEnabled(false);
    connect(button,&QPushButton::clicked,this,&MainWindow::handleClicked);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::handleClicked()
{
    qDebug("fuck you all!");
}

void MainWindow::on_pushButton_clicked()
{
    qDebug("fuck you!");
    if(button->isEnabled())
        button->setEnabled(false);
    else
        button->setEnabled(true);
}
